package com.bitters.fileupload.entity;

/**
 * @author thomashe
 * @date 2022/5/30
 **/
public class FileProgressEntity {

    private long bytesRead = 0L;

    public long getBytesRead() {
        return bytesRead;
    }

    public void setBytesRead(long bytesRead) {
        this.bytesRead = bytesRead;
    }

    public long getContentLength() {
        return contentLength;
    }

    public void setContentLength(long contentLength) {
        this.contentLength = contentLength;
    }

    public int getFiles() {
        return files;
    }

    public void setFiles(int files) {
        this.files = files;
    }

    private long contentLength = 0L;

    private int files;

    @Override
    public String toString() {
        float tmp = (float) bytesRead;
        float result = tmp / contentLength * 100;
        return "FileProgressEntity [bytesRead=" + bytesRead + ", contentLength="
                + contentLength + ", percentage=" + result + "% , files=" + files + "]";
    }
}
